//
//  Person.h
//  05-排序、数组字典的处理
//
//  Created by LL.F on 16/7/8.
//  Copyright © 2016年 LL.F. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Person : NSObject

@property (nonatomic, retain) NSString *name;
@property (nonatomic, assign) NSInteger age;
@property (nonatomic, retain) NSString *gender;

// 初始化
- (instancetype)initWithName:(NSString *)name
                         age:(NSInteger)age
                      gender:(NSString *)gender;
// 构造器
+ (instancetype)personWithName:(NSString *)name
                           age:(NSInteger)age
                        gender:(NSString *)gender;
// 按年龄排序
- (NSComparisonResult)compareByAge:(Person *)anotherPerson;
// 按名字排序
- (NSComparisonResult)compareByName:(Person *)anotherPerson;
// 按性别排序
- (NSComparisonResult)compareByGender:(Person *)anotherPerson;
@end
